<!--
 * @Descripttion: 
 * @version: 
 * @Author: lyw
 * @Date: 2022-02-10 15:13:15
 * @LastEditors: lyw
 * @LastEditTime: 2022-02-17 16:22:20
-->
<template>
  <el-container class="goods" id="goods" name="goods">
    <!-- 面包屑和分类 -->
    <el-header class="elheader">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>采购大厅</el-breadcrumb-item>
        <el-breadcrumb-item>全部商品</el-breadcrumb-item>
      </el-breadcrumb>
      <div class="classification">
        <el-container class="product-nav">
          <div class="title">分类：</div>
          <el-tabs v-model="activeName1" @tab-click="handleClick1">
            <el-tab-pane label="高端农产品" name="first"></el-tab-pane>
            <el-tab-pane label="时令鲜果" name="second"></el-tab-pane>
            <el-tab-pane label="加工品" name="third"></el-tab-pane>
            <el-tab-pane label="生鲜海产品" name="fourth"></el-tab-pane>
          </el-tabs>
        </el-container>
        <el-container class="product-find">
          <div class="title">热门推荐：</div>
          <el-tabs v-model="activeName2" @tab-click="handleClick2">
            <el-tab-pane label="产品1" name="first"></el-tab-pane>
            <el-tab-pane label="产品2" name="second"></el-tab-pane>
            <el-tab-pane label="产品3" name="third"></el-tab-pane>
            <el-tab-pane label="产品4" name="fourth"></el-tab-pane>
          </el-tabs>
        </el-container>
      </div>
    </el-header>
    <!-- 面包屑和分类 END-->
    <div>
      <el-table :data="tableData" stripe style="width: 100%">
        <el-table-column prop="good" label="采购品种" width="200">
        </el-table-column>
        <el-table-column prop="num" label="采购数量" width="180">
        </el-table-column>
        <el-table-column prop="address" label="期望货源地" width="200">
        </el-table-column>
        <el-table-column prop="person" label="发布人" width="140">
        </el-table-column>
        <el-table-column prop="istrue" label="认证情况" width="140">
        </el-table-column>
        <el-table-column prop="operate" label="操作" width="140">
          <router-link :to="{path: '/Purchasegood'}" style="background-color: #45e21e">查看详情</router-link>
        </el-table-column>
      </el-table>
    </div>
    
    <!-- 分页 -->
    <div class="block">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page.sync="currentPage"
        :page-size="100"
        layout="prev, pager, next, jumper"
        :total="500"
        style="margin-left: 300px; margin-top: 50px"
      >
      </el-pagination>
    </div>
    <!-- 分页END -->
  </el-container>
</template>

<script>
import Purchasegood from './Purchasegood.vue';
export default {
  data() {
    return {
      activeName1: "",
      activeName2: "",
      currentPage: 1,
      tableData: [
        {
          good: "苹果",
          num: "5公斤",
          address: "全国",
          person: "刘先生",
          istrue: "已通过认证",
          operate: "查看详情",
        },
      ],
    };
  },
  methods: {
    handleClick1() {},
    handleClick2() {},
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  }
};
</script>

<style scoped>
.elheader {
  padding: 0;
  min-height: 180px;
}
/* 分类标签CSS */
.classification {
  margin-top: 10px;
  background-color: #eef0ee;
}
.classification .product-nav {
  width: 100px;
  height: 40px;
  line-height: 40px;
  margin-left: 10px;
}
.classification .product-nav .title {
  min-width: 50px;
  font-size: 16px;
  font-weight: 700;
  float: left;
}
.classification .product-find {
  width: 100px;
  height: 100px;
  line-height: 40px;
  margin-left: 10px;
}
.classification .product-find .title {
  min-width: 150px;
  font-size: 16px;
  font-weight: 700;
  float: left;
}
/* 分类标签CSS END */
</style>